Show AllShow All

ShowCellBackgroundFromOLAP Property

True if the MDX (Multidimensional Expression) that Microsoft Excel sends to the server includes the BackColor property for each cell in the data area that corresponds to a cell in the Online Analytical Processing (OLAP) data set. The default value is False. Read/write Boolean.

expression.ShowCellBackgroundFromOLAP

expression    Required. An expression that returns a PivotTable object.

Remarks

If the OLAP data set returns a BackColor property value, then the cell fill color is set to the nearest color in Microsoft Excel's palette for that worksheet. If the user applies cell pattern formatting to the cell manually, then that will override any formatting from the OLAP data set.

Example

This example determines the setting for showing the cell background from an OLAP data set and notifies the user. The example assumes a PivotTable exists on the active worksheet.

Sub CheckCellBackground()

    Dim pvtTable As PivotTable

    Set pvtTable = ActiveSheet.PivotTables(1)

    ' Determine setting and notify user.
    If pvtTable.ShowCellBackgroundFromOLAP = True Then
        MsgBox "The MDX that Excel sends to the server contains the BackColor property."
    Else
        MsgBox "The MDX that Excel sends to the server does not contain the BackColor property."
    End If

End Sub